<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3" xmlns:head="http://www.w3.org/1999/html">
<head th:include="public/public_css::public_css ('查看拣货任务人员')" />

<body style="background-color: #f2f2f2;">
<div class="layui-fluid larry-wrapper">
    <div class="layui-card">
        <div class="layui-row layui-col-space30">
        <div class="layui-col-xs24">
            <!--列表-->
            <section class="panel panel-padding layui-card-body" >
                <div class="pro">
                    <p>未完成明细</p>
                    <table id="table" class="table text-nowrap"></table>
                </div>
                <div class="pro">
                    <p>已完成明细</p>
                    <table id="table2" class="table text-nowrap"></table>
                </div>
                <input type="hidden" class="layui-input" th:value="${ssydid}" id="ssydid"/>
            </section>
        </div>
    </div>
    </div>
</div>

</body>


<div th:include="public/public_js::public_js"></div>
<script>
    layui.use(['list','layer','zzpUtils','jquery','laydate'],function () {
        var zzpUtils= layui.zzpUtils,
            $ = layui.jquery,
            laydate = layui.laydate;

        var $table = zzpUtils.table({
            elem: '#table',
            isApi: true,
            pagination:true,
            showColumns: false,
            url: '[{}]',
            columns: [{
                field: 'hpbh',
                title: '货品编号'
            },{
                field: 'hpmc',
                title: '货品名称'
            },{
                field: 'kwmc',
                title: '库位名称'
            },{
                field: 'hppc',
                title: '货品批次',
            },{
                field: 'gysmc',
                title: '供应商名称'
            },{
                field: 'scrq',
                title: '生产日期'
            },{
                field: 'rksj',
                title: '入库时间'
            },{
                field: 'jhr',
                title: '拣货人'
            },{
                field: 'jhsj',
                title: '拣货时间'
            }],
            detailFormatter: function (index, row) {
                return "这里就没有确定过11";
            },
            onDblClickRow:function ( row,index) {/*双击行展示详情*/
                btn_cha(row.id);
            }

        });
        var $table2 = zzpUtils.table({
            elem: '#table2',
            isApi: true,
            pagination:true,
            showColumns: false,//隐藏显示列
            url: '[{}]',
            columns: [ {
                field: 'hpbh',
                title: '货品编号'
            },{
                field: 'hpmc',
                title: '货品名称'
            },{
                field: 'kwmc',
                title: '库位名称'
            },{
                field: 'hppc',
                title: '货品批次',
            },{
                field: 'gysmc',
                title: '供应商名称'
            },{
                field: 'scrq',
                title: '生产日期'
            },{
                field: 'rksj',
                title: '入库时间'
            },{
                field: 'jhr',
                title: '拣货人'
            },{
                field: 'jhsj',
                title: '拣货时间'
            }],
            detailFormatter: function (index, row) {
                return "这里就没有确定过11";
            },
            onDblClickRow:function ( row,index) {/*双击行展示详情*/
                btn_cha(row.id);
            }

        });
        var ids=$("#ssydid").val();
        $.ajax({
            type: "GET",
            url: "/zxsdwms/wmspicking/seeCompleteTask/"+ids,
            dataType: "JSON",
            async: false,
            success: function (data) {
                console.log(666666, data);
                $table.bootstrapTable('append', data.rows);
            },
            error: function () { console.log("Error"); }
        });
        $.ajax({
            type: "GET",
            url: "/zxsdwms/wmspicking/notCompleteTask/"+ids,
            dataType: "JSON",
            async: false,
            success: function (data) {
                console.log(666666, data);
                $table2.bootstrapTable('append', data.rows);
            },
            error: function () { console.log("Error"); }
        });
        $(".inline-search-btn").on('click',function () {
            zzpUtils.refreshTable("#table");
        })
    });
</script>
</html>